import Vue from 'vue'
import VueRouter from 'vue-router'
// 配置路由
import LayOut from '@/views/LayOut' // 一级首页架子
import LoGin from '@/views/LoGin' // 登录页
import StoresControl from '@/views/StoresControl  ' // 仓库管理
import ReservoirArea from '@/views/ReservoirArea' // 库区管理
import StorageLocation from '@/views/StorageLocation' // 库位管理
import LibraryView from '@/views/LibraryView' // 库位视图
import KindsGoods from '@/views/KindsGoods' // 货品管理
import GoodsType from '@/views/GoodsType' // 货品类型管理
import DashBoard from '@/views/DashBoard' // 二级
Vue.use(VueRouter)
// const routes = []
// export default router
const router = new VueRouter({
  routes: [
    { path: '/login', component: LoGin },
    {
      path: '/',
      component: LayOut,
      redirect: '/dashboard',
      children: [
        { path: '/DashBoard', component: DashBoard },
        { path: '/storescontrol', component: StoresControl },
        { path: '/reservoirarea', component: ReservoirArea },
        { path: '/storagelocation', component: StorageLocation },
        { path: '/libraryview', component: LibraryView },
        { path: '/kindsgoods', component: KindsGoods },
        { path: '/goodstype', component: GoodsType }
      ]
    }
  ]
})
export default router
